home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / syscall / ds3100.md / RCS / userSysCallInt.h,v < prev    next >
Encoding:
Text File  |  1989-11-06  |  2.0 KB  |  94 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     89.07.26.18.24.50;  author nelson;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     89.07.11.19.52.25;  author nelson;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Initial code from DECWRL.
  22. @
  23.  
  24.  
  25. 1.2
  26. log
  27. @pmax => ds3100
  28. @
  29. text
  30. @/*
  31.  * userSysCallInt.h --
  32.  *
  33.  *     Contains macro for stubs for user-level system calls.
  34.  *
  35.  * Copyright 1985, 1988 Regents of the University of California
  36.  * Permission to use, copy, modify, and distribute this
  37.  * software and its documentation for any purpose and without
  38.  * fee is hereby granted, provided that the above copyright
  39.  * notice appear in all copies.  The University of California
  40.  * makes no representations about the suitability of this
  41.  * software for any purpose.  It is provided "as is" without
  42.  * express or implied warranty.
  43.  *
  44.  * rcs = $Header: /sprite/src/lib/c/syscall/ds3100.md/RCS/userSysCallInt.h,v 1.1 89/07/11 19:52:25 nelson Exp Locker: nelson $ SPRITE (Berkeley)
  45.  */
  46.  
  47. #include "kernel/sysSysCall.h"
  48. #include "kernel/ds3100.md/machConst.h"
  49. #include <regdef.h>
  50.  
  51. #ifndef _USERSYSCALLINT
  52. #define _USERSYSCALLINT
  53.  
  54. /*
  55.  * Magic number to put into t1 so we know that this is a Sprite system 
  56.  * call and not a UNIX one.
  57.  */
  58. #define    SYS_MAGIC    0xbab1fade
  59.  
  60. /*
  61.  * ----------------------------------------------------------------------------
  62.  *
  63.  * SYS_CALL --
  64.  *
  65.  *      Define a user-level system call.  The call sets up a trap into a 
  66.  *    system-level routine with the appropriate constant passed as
  67.  *     an argument to specify the type of system call.
  68.  * ----------------------------------------------------------------------------
  69.  */
  70.  
  71. #define SYS_CALL(name, constant) \
  72.     .globl name; name: \
  73.     li t0, constant; \
  74.     li t1, SYS_MAGIC; \
  75.     syscall; \
  76.     j ra
  77.  
  78. #endif _USERSYSCALLINT
  79. @
  80.  
  81.  
  82. 1.1
  83. log
  84. @Initial revision
  85. @
  86. text
  87. @d15 1
  88. a15 1
  89.  * rcs = $Header: userSysCallInt.h,v 1.1 89/06/20 18:40:44 mnelson Exp $ SPRITE (Berkeley)
  90. d19 1
  91. a19 1
  92. #include "kernel/pmax.md/machConst.h"
  93. @
  94.